<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="course.css">
    <title>课程管理</title>
</head>
<body>
    <a href="../../index.html">返回主页</a>
    
    <div class="accordion" onclick="toggleAccordion(this)">添加课程</div>
    <div id="insert" class="accordion-content">
      <form id="insertFormInfo">
        <label for="recommendMaxNum">推荐的最大人数</label>
        <input type="number" name="recommendMaxNum" id="recommendMaxNum" required>
        <br>
        <label for="recommendMinNum">推荐的最小人数</label>
        <input type="number" name="recommendMinNum" id="recommendMinNum" required>
        <br>
        <label for="courseName">课程名称</label>
        <input type="text" name="courseName" id="courseName" required>
        <br>
        <label for="courseSubject">课程类别</label>
        <input type="text" name="courseSubject" id="courseSubject" required>
        <br>
        <label for="introduction">文字介绍</label>
        <input type="text" name="introduction" id="introduction" required>
        <br>
        <label for="courseType">课程类型</label>
        <select name="courseType" id="courseType">
          <option value="group" selected>团课</option>
          <option value="team">小班</option>
          <option value="vip">私教</option>
        </select>
        <br>
        <label for="fileInput">课程图片</label>
        <input type="file" name="introductionURL" id="fileInput">
        <button id="submitImg" type="button" >使用这个图片</button>
        <br>
        <button type="submit">确认</button>
      </form>
    </div>
    <div class="accordion" onclick="toggleAccordionSelect(this)">查看现有课程</div>
    <div id="select" class="accordion-content">
      <table id="coursesTable">
        <thead>
            <tr>
                <th>课程ID</th>
                <th>课程名称</th>
                <th>课程学科</th>
                <th>课程介绍</th>
                <th>课程类型</th>
                <th>推荐人数</th>
                <th>推荐最少人数</th>
            </tr>
        </thead>
        <tbody>
            <!-- Dynamic content will be added here -->
        </tbody>
    </table>
    </div>
    <div class="accordion" onclick="toggleAccordion(this)">删除课程</div>
    <div id="delete" class="accordion-content">
      <div id="deleteFormInfo">
        <label for="deleteCourseName">课程名字</label>
        <input type="text" name="deleteCourseName" id="deleteCourseName" required>
        <br>
        <button id="deleteCourseButton">确认</button>
      </div>
    </div>

    <div id="courseCardDiv">
        <table id="courseCardTable">

        </table>
    </div>



    <script src="course.js"></script>
</body>
</html>